package com.sgb.goods.widget.pop;

import android.content.Context;
import android.view.View;

import com.sgb.goods.entity.OrderDynamicEntity;
import com.sgb.goods.utils.base.adapter.BaseCommonAdapter;
import com.sgb.goods.widget.pop.adapter.OrderDynamicAdapter;
import com.swgk.core.dialog.PopViewHolder;
import com.swgk.core.util.DisplayUtil;

import java.util.List;

/**
 * 订单动态弹窗
 *
 * @author cyj
 */
public class OrderDynamicPop extends SimpleTile1Pop<OrderDynamicEntity.OrderDynamicRecords> {

    private OrderDynamicAdapter adapter;

    public OrderDynamicPop(Context context) {
        super(context);
    }

    @Override
    protected BaseCommonAdapter<OrderDynamicEntity.OrderDynamicRecords> getAdapter() {
        return null == adapter ? adapter = new OrderDynamicAdapter() : adapter;
    }

    @Override
    protected void initView(PopViewHolder holder) {
        super.initView(holder);
        mTitle.setText("订单动态");
    }

    public void showPop(View view, List<OrderDynamicEntity.OrderDynamicRecords> list) {
        adapter.setNewData(list);
        super.showDownPopwindow(view, true);
    }

}
